package org.domain.sigerec.session;

import org.domain.sigerec.entity.Cabine;
import org.domain.sigerec.enums.TipoClasseEnum;
import org.domain.sigerec.enums.TipoTelefoneEnum;
import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.web.RequestParameter;
import org.jboss.seam.framework.EntityHome;


@Name("cabineHome")
public class CabineHome extends EntityHome<Cabine>
{

    /**
	 * 
	 */
	private static final long serialVersionUID = 4187230443691786512L;
	@RequestParameter 
    Long cabineId;
    
	private String nome;
	
	public String getNome() {
		return nome;
	}
	
	public void setNome(String nome) {
		this.nome = nome;
	}
	
    @Override
    public Object getId() 
    { 
        if (cabineId==null)
        {
            return super.getId();
        }
        else
        {
            return cabineId;
        }
    }
    
    @Override @Begin
    public void create() {
        super.create();
    }
 	
    @Override
	public String persist() {
		// TODO Auto-generated method stub
		return super.persist();
	}
    
    @Factory("classes")
	public TipoClasseEnum[] getClasses() {
		return TipoClasseEnum.values();
	}

	

}
